<template>
	<van-nav-bar :title="top_title" :safe-area-inset-top="true" :placeholder="true"/>
</template>

<script>
import Vue from 'vue';
import { NavBar } from 'vant';

Vue.use(NavBar);

export default {
	name : 'headerTop',
	data() {
		return {
			top_title:'',
		};
	},
	created() {
		if (this.$route.name == "game_hall") {
			this.top_title = "谁是卧底 - 游戏大厅";
		} else if (this.$route.name == "friend_index") {
			this.top_title = "谁是卧底 - 我的好友";
		} else if (this.$route.name == "user_center") {
			this.top_title = "谁是卧底 - 用户中心";
		} 
	},
	methods: {}
};
</script>

<style>
	.van-nav-bar {
		background-color:#FFD801;
	}
</style>
